import { observable, action, useStrict, computed, asMap, toJS } from 'mobx';
import { Form } from 'weaver-mobile-page';

export class FreeFlowSetStore{
    
    /** 流程图处传过来的当前节点数据 */

    @observable currentElement = {};
    @observable currentDatas = {};

    /********/

    /** 节点属性 form */
    @observable formStore = new Form.Store({route:'/req/wfFreeFlowSet/detail'});
    @observable formPanelToggleState = {//控制详细设置折叠面板显示隐藏
        "0" : true,
        "1" : false
    };
    /*****分支属性参数 */
    @observable branchType = '';

    @action
    initDatas = (data={}) => {
        const {currentElement={}} = data;
        this.currentDatas = data;
        this.setCurrentElement(currentElement);
    }
    @action
    setCurrentElement = (data={}) => {
        this.currentElement = data;
    }
    @action
    getCurrentElement = () => {
        return toJS(this.currentElement);
    }
    /*****分支属性 */
    @action
    setBranchType = (type='1') => {
        this.branchType = type;
    }
}